
<template>
<DetailDescTable ref="DetailDescTable" :title="$tt('label_warehouse_area_detail')" :descOption="detailDesc"
                 :url="detailUrl" :urlDataHandle="detailUrlDataHandle"/>
</template>

<script>
import DetailDescTable from "../detail_common.vue";

export default {
  name: "detail_area",
  components: {DetailDescTable},
  data() {
    return {
      title: 'label_warehouse_area_detail',
      detailUrl: '/wms-api/base/WmsBaseAreaRpc/detail.json',
      detailUrlDataHandle: (res) => {
        let {wavePlanDetailDTOList, ...descData} = res.data
        return {
          descData, tableData: wavePlanDetailDTOList,
        }
      },
      detailDesc: {
        model: [
          {key: 'code', label: 'label_warehouse_area_code'},
          {key: 'name', label: 'label_warehouse_area_name',},
          {key: 'nameEn', label: 'label_warehouse_area_english_name',},
          {key: 'type', label: 'label_warehouse_type', formatter: (r,c,v) => this.$enumShow(v, "BaseAreaTypeEnum")},
          {key: 'status', label: 'label_status', formatter: (r,c,v) => this.$enumShow(v, "IsAvailableStatusEnum")},
          {key: 'warehouseName', label: 'label_warehouse_name'},
          {key: 'alleyNum', label: 'label_tunnel_count',},
          {key: 'useType', label: 'label_warehouse_area_usage', formatter: (r,c,v) => this.$enumShow(v, "BaseAreaUsageTypeEnum")},
          {key: 'takedownMode', label: 'label_pick_down_method', formatter: (r,c,v) => this.$enumShow(v, "BaseTakedownModeEnum")},

          {key: 'maxBoxNum', label: 'label_maximum_number_boxes',},

          
          {key: 'maxBoardNum', label: 'label_minimum_number_pallet',},
          {key: 'floor', label: 'label_floor',},
          {key: 'mixFlag', label: 'label_is_mixed_load', formatter: (r,c,v) => this.$enumShow(v, "YesOrNoEnum")},
          {key: 'attribute', label: 'label_warehouse_area_attr',},
          {key: 'baseRemark', label: 'label_remark',},
          {key: 'creator', label: 'label_create_user',},
          {key: 'gmtCreate', label: 'label_create_time',  formatter: (r, c, v, i) => this.$dateFormat(v)},

          {key: 'storageRatio', label: 'label_restriction_ratio',formatter: (r, c, v, i) => `${v}%`},
          {key: 'outboundRatio', label: 'label_plate_shipment_ratio',formatter: (r, c, v, i) => `${v}%`},
          {
            key: 'inboundLimitType',
            label: 'label_limit_inbound_type',
            formatter: (r,c,v) => this.$enumShow(v, "BaseLimitInboundTypeEnum")
          },
          {key: 'allowPick', label: 'label_allow_picking', formatter: (r,c,v) => this.$enumShow(v, "YesOrNoEnum")},
          {key: 'taskSort', label: 'label_picking_order',},
          {key: 'businessRemark', label: 'label_remark',},

        ],
      },
    }
  },
  methods: {
    show({title, ...obj}) {
      this.title = title
      this.$refs['DetailDescTable'].show(obj)

    },

    hide() {
      this.$refs['DetailDescTable'].hide()
    },

  }

}
</script>

<style scoped>

</style>
